stamp_widgets_enums = custom_target('stamp-widgets-enums.h',
  input : [
    files(
      'widgets-enums.h'
    ),
  ],
  output: [ 'stamp-widgets-enums.h', ],
  command: [
    mkenums_wrap, perl,
    meson.project_source_root(), meson.current_source_dir(),
    meson.current_build_dir(),
    'widgets-',
    '#include <gtk/gtk.h>\n'              +
    '#include "libgimpbase/gimpbase.h"\n',
    '#include "gimp-intl.h"'
  ],
  build_by_default: true
)

gimp_language_store_data = []
if isocodes.found()
  gimp_language_store_data = custom_target('gimplanguagestore-data.h',
                                           input: [ gen_languages ],
                                           output: 'gimplanguagestore-data.h',
                                           command: [ gen_languages ])
endif

libappwidgets_sources = [
  'gimpaccellabel.c',
  'gimpaction-history.c',
  'gimpaction.c',
  'gimpactioneditor.c',
  'gimpactionfactory.c',
  'gimpactiongroup.c',
  'gimpactionimpl.c',
  'gimpactionview.c',
  'gimpblobeditor.c',
  'gimpbrusheditor.c',
  'gimpbrushfactoryview.c',
  'gimpbrushselect.c',
  'gimpbuffersourcebox.c',
  'gimpbufferview.c',
  'gimpcairo-wilber.c',
  'gimpcellrendererbutton.c',
  'gimpcellrendererdashes.c',
  'gimpcellrendererviewable.c',
  'gimpchanneltreeview.c',
  'gimpcircle.c',
  'gimpclipboard.c',
  'gimpcolorbar.c',
  'gimpcolordialog.c',
  'gimpcolordisplayeditor.c',
  'gimpcoloreditor.c',
  'gimpcolorframe.c',
  'gimpcolorhistory.c',
  'gimpcolormapeditor.c',
  'gimpcolormapselection.c',
  'gimpcolorpanel.c',
  'gimpcolorselectorpalette.c',
  'gimpcombotagentry.c',
  'gimpcomponenteditor.c',
  'gimpcompressioncombobox.c',
  'gimpcontainerbox.c',
  'gimpcontainercombobox.c',
  'gimpcontainereditor.c',
  'gimpcontainerentry.c',
  'gimpcontainericonview.c',
  'gimpcontainerlistview.c',
  'gimpcontainerpopup.c',
  'gimpcontainertreestore.c',
  'gimpcontainertreeview-dnd.c',
  'gimpcontainertreeview.c',
  'gimpcontainerview-cruft.c',
  'gimpcontainerview-private.c',
  'gimpcontainerview-utils.c',
  'gimpcontainerview.c',
  'gimpcontrollereditor.c',
  'gimpcontrollercategory.c',
  'gimpcontrollerinfo.c',
  'gimpcontrollerkeyboard.c',
  'gimpcontrollerlist.c',
  'gimpcontrollermanager.c',
  'gimpcontrollers.c',
  'gimpcontrollerwheel.c',
  'gimpcriticaldialog.c',
  'gimpcursor.c',
  'gimpcurveview.c',
  'gimpdashboard.c',
  'gimpdasheditor.c',
  'gimpdataeditor.c',
  'gimpdatafactoryview.c',
  'gimpdeviceeditor.c',
  'gimpdeviceinfo-coords.c',
  'gimpdeviceinfo.c',
  'gimpdeviceinfoeditor.c',
  'gimpdevicemanager.c',
  'gimpdevices.c',
  'gimpdevicestatus.c',
  'gimpdial.c',
  'gimpdialogfactory.c',
  'gimpdnd-xds.c',
  'gimpdnd.c',
  'gimpdock.c',
  'gimpdockable.c',
  'gimpdockbook.c',
  'gimpdockcolumns.c',
  'gimpdockcontainer.c',
  'gimpdocked.c',
  'gimpdockwindow.c',
  'gimpdocumentview.c',
  'gimpdoubleaction.c',
  'gimpdrawabletreeview.c',
  'gimpdrawabletreeview-filters.c',
  'gimpdynamicseditor.c',
  'gimpdynamicsfactoryview.c',
  'gimpdynamicsoutputeditor.c',
  'gimpeditor.c',
  'gimpenumaction.c',
  'gimperrorconsole.c',
  'gimperrordialog.c',
  'gimpexportdialog.c',
  'gimpextensionlist.c',
  'gimpextensiondetails.c',
  'gimpfgbgeditor.c',
  'gimpfgbgview.c',
  'gimpfiledialog.c',
  'gimpfileprocview.c',
  'gimpfilleditor.c',
  'gimpfontfactoryview.c',
  'gimpfontselect.c',
  'gimpgradienteditor.c',
  'gimpgradientselect.c',
  'gimpgrideditor.c',
  'gimphandlebar.c',
  'gimphelp.c',
  'gimphistogrambox.c',
  'gimphistogrameditor.c',
  'gimphistogramview.c',
  'gimpiconpicker.c',
  'gimpimagechooser.c',
  'gimpimagecommenteditor.c',
  'gimpimageeditor.c',
  'gimpimageparasiteview.c',
  'gimpimageprofileview.c',
  'gimpimagepropview.c',
  'gimpimageselect.c',
  'gimpimageview.c',
  'gimpitemchooser.c',
  'gimpitemselect.c',
  'gimpitemtreeview.c',
  'gimpitemtreeview-search.c',
  'gimplanguagecombobox.c',
  'gimplanguageentry.c',
  'gimplanguagestore.c',
  'gimplayermodebox.c',
  'gimplayermodecombobox.c',
  'gimplayertreeview.c',
  'gimpmenu.c',
  'gimpmenubar.c',
  'gimpmenushell.c',
  'gimpmenudock.c',
  'gimpmenufactory.c',
  'gimpmenumodel.c',
  'gimpmessagebox.c',
  'gimpmessagedialog.c',
  'gimpmeter.c',
  'gimpmodifierseditor.c',
  'gimpnavigationview.c',
  'gimpopendialog.c',
  'gimpoverlaybox.c',
  'gimpoverlaychild.c',
  'gimpoverlaydialog.c',
  'gimpoverlayframe.c',
  'gimppaletteeditor.c',
  'gimppaletteselect.c',
  'gimppaletteview.c',
  'gimppanedbox.c',
  'gimppatternfactoryview.c',
  'gimppatternselect.c',
  'gimppdbdialog.c',
  'gimppickablebutton.c',
  'gimppickablechooser.c',
  'gimppickablepopup.c',
  'gimppivotselector.c',
  'gimppixbuf.c',
  'gimppluginview.c',
  'gimppolar.c',
  'gimppopup.c',
  'gimpprefsbox.c',
  'gimpprocedureaction.c',
  'gimpprogressbox.c',
  'gimpprogressdialog.c',
  'gimppropwidgets.c',
  'gimpradioaction.c',
  'gimprender.c',
  'gimprow.c',
  'gimprow-utils.c',
  'gimprowdeviceinfo.c',
  'gimprowdrawablefilter.c',
  'gimprowfilter.c',
  'gimprowseparator.c',
  'gimprowsettings.c',
  'gimpsamplepointeditor.c',
  'gimpsavedialog.c',
  'gimpsearchpopup.c',
  'gimpselectiondata.c',
  'gimpselectioneditor.c',
  'gimpsessioninfo-aux.c',
  'gimpsessioninfo-book.c',
  'gimpsessioninfo-dock.c',
  'gimpsessioninfo-dockable.c',
  'gimpsessioninfo.c',
  'gimpsessionmanaged.c',
  'gimpsettingsbox.c',
  'gimpsettingseditor.c',
  'gimpshortcutbutton.c',
  'gimpsizebox.c',
  'gimpstringaction.c',
  'gimpstrokeeditor.c',
  'gimpsymmetryeditor.c',
  'gimptagentry.c',
  'gimptagpopup.c',
  'gimptemplateeditor.c',
  'gimptemplateview.c',
  'gimptextbuffer-serialize.c',
  'gimptextbuffer.c',
  'gimptexteditor.c',
  'gimptextproxy.c',
  'gimptextstyleeditor.c',
  'gimptexttag.c',
  'gimpthumbbox.c',
  'gimptoggleaction.c',
  'gimptoolbar.c',
  'gimptoolbox-color-area.c',
  'gimptoolbox-dnd.c',
  'gimptoolbox-image-area.c',
  'gimptoolbox-indicator-area.c',
  'gimptoolbox.c',
  'gimptoolbutton.c',
  'gimptooleditor.c',
  'gimptooloptionseditor.c',
  'gimptoolpalette.c',
  'gimptoolpreseteditor.c',
  'gimptoolpresetfactoryview.c',
  'gimptranslationstore.c',
  'gimpuimanager.c',
  'gimpundoeditor.c',
  'gimppathtreeview.c',
  'gimpview-popup.c',
  'gimpview.c',
  'gimpviewablebox.c',
  'gimpviewablebutton.c',
  'gimpviewabledialog.c',
  'gimpviewrenderer-frame.c',
  'gimpviewrenderer-utils.c',
  'gimpviewrenderer.c',
  'gimpviewrendererbrush.c',
  'gimpviewrendererbuffer.c',
  'gimpviewrendererdrawable.c',
  'gimpviewrendererfont.c',
  'gimpviewrenderergradient.c',
  'gimpviewrendererimage.c',
  'gimpviewrendererimagefile.c',
  'gimpviewrendererlayer.c',
  'gimpviewrendererpalette.c',
  'gimpviewrendererpath.c',
  'gimpwidgets-constructors.c',
  'gimpwidgets-utils.c',
  'gimpwindow.c',
  'gimpwindowstrategy.c',

  'widgets-enums.c',
  stamp_widgets_enums,

  gimp_language_store_data,

  appcoremarshal[1],
]


libappwidgets = static_library('appwidgets',
  libappwidgets_sources,
  include_directories: [ rootInclude, rootAppInclude, ],
  c_args: '-DG_LOG_DOMAIN="Gimp-Widgets"',
  dependencies: [
    gegl, gtk3, gexiv2,
  ],
)
